#!/usr/bin/perl

$ethname="eth0";
$ethname=$ARGV[0];
$comresult=`/sbin/ifconfig $ethname`;

$return="";

if($comresult=~/RX bytes:(\d*) \(.*TX bytes:(\d*) \(.*/){
	# 100MB带宽 = 102400/8=1280
	# 1GB带宽 = 1024000/8=12800
	#$return="$ethname.RX=+$1/12800,,,,$ethname.TX=+$2/12800\n";
	$return="$ethname.RX=+$1,,,,$ethname.TX=+$2\n";
}
print $return;
